Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multivariate polynomial support #261

Closed
wants to merge 10 commits into from

Conversation

ryanleh
Copy link
Contributor

@ryanleh ryanleh commented Aug 28, 2020

  • Renamed all univariate structs to differentiate
  • Added dense + sparse multivariate coefficient representations which support basic addition/subtraction and evaluation

Plan to add some further functionality and evaluation representation in the near future

@weikengchen
Copy link
Member

ah, cargo fmt --all may help. Some IDE support automatic rustfmt when saving (such as Clion).

@weikengchen
Copy link
Member

as for no_std, I have a hard feeling: rust-ndarray/ndarray#708

Ndarray does not support no_std at this moment. Maybe we need a word of wisdom from Pratyush. @Pratyush Should we try to see if there are any similar libraries with no_std? How serious is no_std?

@ryanleh
Copy link
Contributor Author

ryanleh commented Aug 28, 2020

Hmm not sure what's happening, running rustfmt on the exact files it's complaining about locally doesn't do anything (cargo fmt --all also doesn't change anything).

And ya, didn't think about the issue with ndarray. Honestly, the dense representation probably isn't going to be used that much, so if it is an issue removing it is probably fine.

@weikengchen
Copy link
Member

weikengchen commented Aug 28, 2020

Let us wall wait for the stable/nightly CI to finish. I can have a try of rustfmt after.

@weikengchen
Copy link
Member

Ah, my local rustfmt did not complain about anything. Maybe let us ignore that for a while...

@Pratyush
Copy link
Member

Re Rustfmt, you might be using nightly, so it’s using the nightly rustfmt

@ryanleh
Copy link
Contributor Author

ryanleh commented Oct 6, 2020

These recent commits move the univariate and multivariate implementations into separate modules and defines a few new interfaces which will be useful for poly-commit and a few other crates.

Polynomial: An interface for all types of polynomials. The domain of the implementing polynomial is an associated type.
UVPolynomial: An interface for univariate polynomials. Currently only DensePolynomial implements this.
MVPolynomial: An interface for multivariate polynomials. There is an additional interface defined for describing terms in the multivariate polynomial which will allow easily integrating specialized multivariate schemes (e.g. multilinear)

@Pratyush
Copy link
Member

This is superseded by PRs on arkworks-rs/algebra

@Pratyush Pratyush closed this Nov 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants